using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace WindowsClient
{
    class CustomStatusStripRenderer : ToolStripRenderer
    {
        protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
        {

            Rectangle backgroundRect = e.AffectedBounds;
            Graphics g = e.Graphics;

            using (
               LinearGradientBrush brush = new LinearGradientBrush(
                   backgroundRect, Color.Gray, Color.Black, LinearGradientMode.Vertical))
            {

                // Fill rectangle
                g.FillRectangle(brush, backgroundRect);
            }


            // Draw highlight
            using (Pen highlightPen =
              new Pen(SystemColors.GrayText))
            {
                g.DrawLine(highlightPen, 0, 0, backgroundRect.Width, 0);
            }
        }

        protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
        {
            e.TextColor = Color.White;
            base.OnRenderItemText(e);
        }

    }
}
